<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich">

<h:form>
	<rich:panel header="Pesquisar Posts">
		<h:panelGrid columns="1">
			<h:outputText value="Trecho do Post: " />
			<h:inputText value="#{postCtrl.pesquisaTexto}" size="30" maxlength="40" />
			<h:outputText value="Selecione Tag: " />
			<h:selectOneMenu value="#{postCtrl.pesquisaTag.id}">
				<s:selectItems var="tag" value="#{listarCtrl.todasTags}" label="#{tag.id}" noSelectionLabel="(Selecione)" />
			</h:selectOneMenu>
			<h:outputText value="Periodo de Publicacao: " />
			<h:panelGroup>
				<rich:calendar value="#{postCtrl.pesquisaDataInicial}" inputSize="7" datePattern="dd/MM/yy" showWeeksBar="false" />
				<rich:spacer width="4" />
				<h:outputText value="a" />
				<rich:spacer width="4" />
				<rich:calendar value="#{postCtrl.pesquisaDataFinal}" inputSize="7" datePattern="dd/MM/yy" showWeeksBar="false" />
			</h:panelGroup>
			<h:panelGroup>
				<h:commandButton action="#{postCtrl.pesquisarPosts}" value="#{messages.actionBuscar}" />
				<rich:spacer width="5" />
				<h:commandButton action="#{postCtrl.limparPesquisaPosts}" value="#{messages.actionLimpar}" />
			</h:panelGroup>
		</h:panelGrid>
	</rich:panel>
</h:form>
</ui:composition>